package br.com.conhecimento.core.data;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

public interface GenericDao<T, ID extends Serializable> {
	 
    T findById(ID id);
 
    List<T> findAll();
    
    List<T> findByCriteria(Criterion... criterion);
    
    List<T> findByExample(T exampleInstance, String[] excludeProperty);
    
    List<T> findByCriteria(List<Criterion> criterion, List<Order> orders);
 
    <D> D makePersistent(D entity);
 
    <D> void makeTransient(D entity);

}